package com.hrs.core.service;

import com.hrs.common.result.Result;
import com.hrs.enity.db.Department;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hrs.enity.ro.DepartmentAddRo;
import com.hrs.enity.ro.DepartmentUpdateRo;
import com.hrs.enity.vo.DepartmentVo;

import java.util.List;

/**
* @author 纱雾休比酱
* @description 针对表【t_department(部门表)】的数据库操作Service
* @createDate 2023-01-12 22:14:50
*/
public interface DepartmentService extends IService<Department> {

    /**
     * 查询部门树形列表*
     * @return
     */
    Result<List<DepartmentVo>> listDepartment();

    /**
     * 查询部门列表*
     * @return
     */
    Result<List<DepartmentVo>> listAll();

    /**
     * 根据id获取部门信息*
     * @param deptId
     * @return
     */
    Result<DepartmentVo> getDepartmentById(Integer deptId);

    /**
     * 添加部门*
     * @param departmentAddRo
     * @return
     */
    Result<String> addDepartment(DepartmentAddRo departmentAddRo);

    /**
     * 更新部门信息*
     * @param departmentUpdateRo
     * @return
     */
    Result<String> updateDepartment(DepartmentUpdateRo departmentUpdateRo);

    /**
     * 删除部门*
     * @param deptId
     * @return
     */
    Result<String> delDepartment(Integer deptId);
}
